﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GA.Framework.BLL;

namespace HQ.Web.Handlers
{
    /// <summary>
    /// Summary description for TableDemoHandler
    /// </summary>
    public class TableDemoHandler : DataTablesHandler
    {
        public override void doQuery()
        {
            int count;
            PageInfo.aaData = PageInfo.GetaaDataList(GenerateDataBLL.Instance.GetDataFromTblStuff(iDisplayStart, iDisplayLength, out count));
            PageInfo.iTotalDisplayRecords = count;
            PageInfo.iTotalRecords = count;
        }

        public override void doSearch()
        {
            int count;
            PageInfo.aaData = PageInfo.GetaaDataList(GenerateDataBLL.Instance.GetDataFromTblStuff(iDisplayStart, iDisplayLength, out count));
            PageInfo.iTotalDisplayRecords = count;
            PageInfo.iTotalRecords = count;
        }

        public override void doSort()
        {
            int count;
            PageInfo.aaData = PageInfo.GetaaDataList(GenerateDataBLL.Instance.GetDataFromTblStuffBySort(iDisplayStart, iDisplayLength, out count, this.iSortCol_0, this.sSortDir_0));
            PageInfo.iTotalDisplayRecords = count;
            PageInfo.iTotalRecords = count;
        }

    }
}